<section class="sidebar">
    <ul class="sidebar-menu">
        <li class="active">
            <a href="<?php echo $this->getController()->createUrl('/admin'); ?>"><i class="fa fa-dashboard"></i> <span>首页</span></a>
        </li>

        <?php foreach ($category as $key => $cinfo): ?>
        <li class="treeview <?php if (($key == $c && !$show_page) || !empty($cinfo['active'])) echo 'active';?>">
            <a href="#">
                <i class="fa <?php echo $cinfo[1]; ?>"></i>
                <span><?php echo $cinfo[0]; ?></span>
                <i class="fa fa-angle-left pull-right"></i>
            </a>
            <?php if (array_key_exists($key, $menus)): ?>
            <ul class="treeview-menu">
                <?php foreach ($menus[$key] as $menu): ?>
                <li class="<?php if ($am == $menu[1] || !empty($menu['active'])) echo 'active'; ?>">
                    <a href="<?php echo $menu[1]; ?>" <?php if (!empty($menu[2])){ echo $menu[2]; } ?>><i class="fa fa-angle-double-right"></i> <?php echo $menu[0]; ?><!--<small class="label pull-right bg-red">12</small>--></a>
                </li>
                <?php endforeach; ?>
            </ul>
            <?php endif; ?>
        </li>
        <?php endforeach; ?>
    </ul>
</section>
